home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Unused stuff in ODF??
- Sent: 3/29/96 8:22 AM
- Received: 3/29/96 8:31 AM
- From: lamiraux@apple.com
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- >Are there classes which won't be in the final version?? Specifically,
- >FW_Pattern seems to be completely superseded by FW_Style.
- >
- >Additionally, why are most of the classes "duplex", IE there is an
- >FW_PStyle and and FW_CStyleRep. There is an FW_Pink and an FW_Cink, with
- >only the "FW_C..." classes having much functionality.
- >
- >THanx.
- >
-
- FW_PPattern and FW_PStyle are very different. FW_PPattern represent a
- pattern (Black and white or Color) like in Quickdraw. FW_PStyle has a
- pensize, a line style (dashed, dotted ...) and a pattern. A shape object
- (rectangle, oval) has a reference to an ink (FW_PInk) a style (FW_PStyle)
- and a font (FW_PFont) for text object.
-
-
- FW_PXXXXX and FW_CXXXXXRep implement what is called smart pointers. You
- never have to deal with FW_CXXXXXRep. FW_PXXXX keeps tracks of the number
- of references on a FW_CXXXXXRep so unreferenced FW_CXXXXXRep are
- automatically deleted. FW_PXXXXX are almost always allocated on the
- stack. This allows you to not having to deal with memory issues and also
- allows you to share FW_PXXXXX. Two shapes for example can point to the
- same FW_PInk. Changing the foreground color in the ink will change it in
- both shapes.
-
- "Smart pointers" is a very common C++ technique. Numerous books have been
- dealing with this subject. Check "Advanced C++" by Coplien.
-
-
- .......................................................................
- Henri Lamiraux lamiraux@apple.com
- Apple Computer, Inc. OpenDoc(tm) Development Framework
- .......................................................................
-
-
-